/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package nominalitzacions.stubs;

import commonlib.ui.LoginAdmin;
import java.awt.event.MouseEvent;

/**
 *
 * @author daniel.camacho.rodriguez
 */
public class LoginAdminStub extends LoginAdmin {

    private ControladorLoginAdminStub iControlador;

    public LoginAdminStub(ControladorLoginAdminStub controlador) {
        initComponents();
        iControlador = controlador;
    }

    protected void AcceptarMouseClicked(MouseEvent evt){        
        String realPass = iControlador.GetRealPassword();
        String putPass = this.getPass();
        if(putPass.equals(realPass))
        {
            iControlador.GoodPassword();
        }
        else
        {
            iControlador.BadPassword();
        }
    }

    protected void RebutjarMouseClicked(MouseEvent evt){
        iControlador.NoShowWindow();
    }

    protected void AcceptarErrorMouseClicked(MouseEvent evt){
        iControlador.AcceptarError();
    }

}
